package org.ycx.upms.dao.model;

import java.io.Serializable;
import java.util.Date;
import org.ycx.common.annotation.FormDesc;

@FormDesc(pk="rid")
public class SecRole implements Serializable {
    /** 编号 */
    @FormDesc(name="编号",maxLength=10,type=1)
    private Integer rid;

    /** 角色名称 */
    @FormDesc(name="角色名称",maxLength=100,type=0)
    private String roleName;

    /** 角色描述 */
    @FormDesc(name="角色描述",maxLength=200,type=0)
    private String roleDesc;

    private Integer userCount;

    /** 角色状态 */
    @FormDesc(name="角色状态",maxLength=2,type=0)
    private String roleState;

    /** 创建时间 */
    @FormDesc(name="创建时间",maxLength=10,type=3)
    private Date createTs;

    /** 创建人 */
    @FormDesc(name="创建人",maxLength=10,type=1)
    private Integer createUid;

    /** 更新时间 */
    @FormDesc(name="更新时间",maxLength=10,type=3)
    private Date updateTs;

    /** 更新人 */
    @FormDesc(name="更新人",maxLength=10,type=1)
    private Integer updateUid;

    private static final long serialVersionUID = 1L;

    public Integer getRid() {
        return rid;
    }

    public void setRid(Integer rid) {
        this.rid = rid;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleDesc() {
        return roleDesc;
    }

    public void setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc;
    }

    public Integer getUserCount() {
        return userCount;
    }

    public void setUserCount(Integer userCount) {
        this.userCount = userCount;
    }

    public String getRoleState() {
        return roleState;
    }

    public void setRoleState(String roleState) {
        this.roleState = roleState;
    }

    public Date getCreateTs() {
        return createTs;
    }

    public void setCreateTs(Date createTs) {
        this.createTs = createTs;
    }

    public Integer getCreateUid() {
        return createUid;
    }

    public void setCreateUid(Integer createUid) {
        this.createUid = createUid;
    }

    public Date getUpdateTs() {
        return updateTs;
    }

    public void setUpdateTs(Date updateTs) {
        this.updateTs = updateTs;
    }

    public Integer getUpdateUid() {
        return updateUid;
    }

    public void setUpdateUid(Integer updateUid) {
        this.updateUid = updateUid;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", rid=").append(rid);
        sb.append(", roleName=").append(roleName);
        sb.append(", roleDesc=").append(roleDesc);
        sb.append(", userCount=").append(userCount);
        sb.append(", roleState=").append(roleState);
        sb.append(", createTs=").append(createTs);
        sb.append(", createUid=").append(createUid);
        sb.append(", updateTs=").append(updateTs);
        sb.append(", updateUid=").append(updateUid);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SecRole other = (SecRole) that;
        return (this.getRid() == null ? other.getRid() == null : this.getRid().equals(other.getRid()))
            && (this.getRoleName() == null ? other.getRoleName() == null : this.getRoleName().equals(other.getRoleName()))
            && (this.getRoleDesc() == null ? other.getRoleDesc() == null : this.getRoleDesc().equals(other.getRoleDesc()))
            && (this.getUserCount() == null ? other.getUserCount() == null : this.getUserCount().equals(other.getUserCount()))
            && (this.getRoleState() == null ? other.getRoleState() == null : this.getRoleState().equals(other.getRoleState()))
            && (this.getCreateTs() == null ? other.getCreateTs() == null : this.getCreateTs().equals(other.getCreateTs()))
            && (this.getCreateUid() == null ? other.getCreateUid() == null : this.getCreateUid().equals(other.getCreateUid()))
            && (this.getUpdateTs() == null ? other.getUpdateTs() == null : this.getUpdateTs().equals(other.getUpdateTs()))
            && (this.getUpdateUid() == null ? other.getUpdateUid() == null : this.getUpdateUid().equals(other.getUpdateUid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRid() == null) ? 0 : getRid().hashCode());
        result = prime * result + ((getRoleName() == null) ? 0 : getRoleName().hashCode());
        result = prime * result + ((getRoleDesc() == null) ? 0 : getRoleDesc().hashCode());
        result = prime * result + ((getUserCount() == null) ? 0 : getUserCount().hashCode());
        result = prime * result + ((getRoleState() == null) ? 0 : getRoleState().hashCode());
        result = prime * result + ((getCreateTs() == null) ? 0 : getCreateTs().hashCode());
        result = prime * result + ((getCreateUid() == null) ? 0 : getCreateUid().hashCode());
        result = prime * result + ((getUpdateTs() == null) ? 0 : getUpdateTs().hashCode());
        result = prime * result + ((getUpdateUid() == null) ? 0 : getUpdateUid().hashCode());
        return result;
    }
}